/**
  ******************************************************************************
  * @file   : disp.h
  * @author : 测试1组（houtiezhu）
  * @version: v0
  * @date   : 2019.07.09
  * @brief  :
  *
  * Copyright (C) 2019  Hangzhou SDIC Microelectronics Co., Ltd
  ******************************************************************************
**/

#ifndef disp_H
#define disp_H

#include "define.h"


extern  uint32 LcdBuf[11];


#define TOTAL_SEGMENTS_NUM 44
extern uint8_t seg_buf[TOTAL_SEGMENTS_NUM];

//9
#define seg_a	(1<<3)
#define seg_b	(1<<2)
#define seg_c	(1<<1)
#define seg_f	(1<<6)
#define seg_g	(1<<5)
#define seg_d	(1<<4)
#define seg_e	(1<<7)
//20230620
#define  Char_0  seg_a+seg_b+seg_c+seg_d+seg_e+seg_f        // char "0"  0x00
#define  Char_1  seg_b+seg_c                                // char "1"  0x01
#define  Char_2  seg_a+seg_b+seg_d+seg_e+seg_g              // char "2"  0x02
#define  Char_3  seg_a+seg_b+seg_c+seg_d+seg_g              // char "3"  0x03
#define  Char_4  seg_b+seg_c+seg_f+seg_g                    // char "4"  0x04
#define  Char_5  seg_a+seg_c+seg_d+seg_f+seg_g              // char "5"  0x05
#define  Char_6  seg_a+seg_c+seg_d+seg_e+seg_f+seg_g        // char "6"  0x06
#define  Char_7  seg_a+seg_b+seg_c                   // char "7"  0x07
#define  Char_8  seg_a+seg_b+seg_c+seg_d+seg_e+seg_f+seg_g  // char "8"  0x08
#define  Char_9  seg_a+seg_b+seg_c+seg_d+seg_f+seg_g        // char "9"  0x09
#define  Char_A  seg_a+seg_b+seg_c+seg_e+seg_f+seg_g  // char "A"
#define  Char_R  seg_g+seg_e                          // char "r"
#define  Char_C  seg_a+seg_d+seg_e+seg_f              // char "C"
#define  Char_D  seg_b+seg_c+seg_d+seg_e+seg_g        // char "d"
#define  Char_E  seg_a+seg_d+seg_e+seg_f+seg_g        // char "E"
#define  Char_F  seg_a+seg_e+seg_f+seg_g              // char "F"
#define	 Char_G  seg_g                                // char "-"
#define  Char_H  seg_b+seg_c+seg_e+seg_f+seg_g        // char "H"
#define  Char_I  seg_e+seg_f 							//I
#define  Char_L  seg_d+seg_f+seg_e                    // char "L"
#define  Char_O  seg_c+seg_d+seg_e+seg_g              // char "o"
#define  Char_i  seg_e                               // char "i"
#define  Char_N  seg_c+seg_e+seg_g                    // char "n"
#define  Char_U  seg_c+seg_d+seg_f + seg_b+seg_e      // char "u"
#define  Char_B  seg_c+seg_d+seg_e+seg_f+seg_g        // char "b"
#define  Char_T  seg_d+seg_e+seg_f+seg_g              // char "t"
#define  Char_P  seg_a+seg_b+seg_e+seg_f+seg_g        // char "P"
#define  Char_NULL 0
//#define  Char_J  seg_b+seg_c+seg_d+seg_g             // char "J"
////Char_K                                              // char "K"
////Char_M                                              // char "M"
//#define  Char_Q  seg_a+seg_b+seg_c+seg_f+seg_g        // char "q"
//#define  Char_S  seg_a+seg_c+seg_d+seg_f+seg_g        // char "S"
//#define  Char_V  seg_b+seg_c+seg_d+seg_e+seg_f        // char "V"
////Char_W                                              // char "W"
////Char_X                                              // char "X"
//#define  Char_Y  seg_b+seg_c+seg_d+seg_f+seg_g        // char "y"
//#define  Char_Z  seg_a+seg_b+seg_d+seg_e+seg_g        // char "Z"
//#define  Char_NULL 0

//===================================================================
//8
#define Aseg_a	(1<<2)
#define Aseg_b	(1<<1)
#define Aseg_c	(1<<0)
#define Aseg_d	(1<<3)
#define Aseg_e	(1<<6)
#define Aseg_f	(1<<5)
#define Aseg_g	(1<<4)

//===================================================================
// position==7  dfb gea c    20210717

#define  AChar_0  Aseg_a|Aseg_b|Aseg_c|Aseg_d|Aseg_e|Aseg_f        // char "0"  0x00
#define  AChar_1  Aseg_b|Aseg_c                                // char "1"  0x01
#define  AChar_2  Aseg_a|Aseg_b|Aseg_g|Aseg_e|Aseg_d             // char "2"  0x02
#define  AChar_3  Aseg_a|Aseg_b|Aseg_c|Aseg_d|Aseg_g              // char "3"  0x03
#define  AChar_4  Aseg_b|Aseg_c|Aseg_f|Aseg_g                    // char "4"  0x04
#define  AChar_5  Aseg_a|Aseg_f|Aseg_g|Aseg_c|Aseg_d              // char "5"  0x05
#define  AChar_6  Aseg_a|Aseg_f|Aseg_e|Aseg_d|Aseg_c|Aseg_g        // char "6"  0x06
#define  AChar_7  Aseg_a|Aseg_b|Aseg_c                   // char "7"  0x07
#define  AChar_8  Aseg_a|Aseg_b|Aseg_c|Aseg_d|Aseg_e|Aseg_f|Aseg_g  // char "8"  0x08
#define  AChar_9  Aseg_a|Aseg_b|Aseg_c|Aseg_d|Aseg_g|Aseg_f        // char "9"  0x09A
#define  AChar_A  Aseg_a|Aseg_b|Aseg_c|Aseg_e|Aseg_f|Aseg_g  // char "A"
#define  AChar_B  Aseg_c|Aseg_d|Aseg_e|Aseg_f|Aseg_g        // char "b"
#define  AChar_C  Aseg_a|Aseg_d|Aseg_e|Aseg_f             // char "C"
#define  AChar_D  Aseg_b|Aseg_c|Aseg_d|Aseg_e|Aseg_g        // char "d"
#define  AChar_E  Aseg_a|Aseg_d|Aseg_e|Aseg_f|Aseg_g        // char "E"
#define  AChar_F  Aseg_a|Aseg_e|Aseg_f|Aseg_g              // char "F"A
#define	 AChar_G   Aseg_g                                // char "-"
#define  AChar_H  Aseg_b|Aseg_c|Aseg_e|Aseg_f|Aseg_g        // char "H"
#define  AChar_i  Aseg_c                               // char "i"
#define  AChar_I  Aseg_c                               // char "I"
#define  AChar_J  Aseg_b|Aseg_c|Aseg_d|Aseg_e             // char "J"
#define  AChar_L  Aseg_d|Aseg_f|Aseg_e                    // char "L"
#define  AChar_n  Aseg_c|Aseg_e|Aseg_g                    // char "n"
#define  AChar_N  Aseg_a|Aseg_b|Aseg_c|Aseg_e|Aseg_f        // char "N"
#define  AChar_O  Aseg_c|Aseg_d|Aseg_e|Aseg_g              // char "o"
#define  AChar_P  Aseg_a|Aseg_b|Aseg_e|Aseg_f|Aseg_g        // char "P"
#define  AChar_Q  Aseg_a|Aseg_b|Aseg_c|Aseg_f|Aseg_g        // char "q"
#define  AChar_R  Aseg_e|Aseg_g                          // char "r"
#define  AChar_T  Aseg_d|Aseg_e|Aseg_f|Aseg_g              // char "t"
#define  AChar_U  Aseg_b|Aseg_c|Aseg_d |Aseg_e|Aseg_f                   // char "u"
#define  AChar_NULL 0

//===================================================================
// position==7  dfb gea c    20210717
#define Bseg_a	(1<<5)
#define Bseg_b	(1<<6)
#define Bseg_c	(1<<3)
#define Bseg_d	(1<<0)
#define Bseg_e	(1<<1)
#define Bseg_f	(1<<2)
#define Bseg_g	(1<<4)

#define  BChar_0  Bseg_a|Bseg_b|Bseg_c|Bseg_d|Bseg_e|Bseg_f        // char "0"  0x00
#define  BChar_1  Bseg_b|Bseg_c                                // char "1"  0x01
#define  BChar_2  Bseg_a|Bseg_b|Bseg_g|Bseg_e|Bseg_d             // char "2"  0x02
#define  BChar_3  Bseg_a|Bseg_b|Bseg_c|Bseg_d|Bseg_g              // char "3"  0x03
#define  BChar_4  Bseg_b|Bseg_c|Bseg_f|Bseg_g                    // char "4"  0x04
#define  BChar_5  Bseg_a|Bseg_f|Bseg_g|Bseg_c|Bseg_d              // char "5"  0x05
#define  BChar_6  Bseg_a|Bseg_f|Bseg_e|Bseg_d|Bseg_c|Bseg_g        // char "6"  0x06
#define  BChar_7  Bseg_a|Bseg_b|Bseg_c                   // char "7"  0x07
#define  BChar_8  Bseg_a|Bseg_b|Bseg_c|Bseg_d|Bseg_e|Bseg_f|Bseg_g  // char "8"  0x08
#define  BChar_9  Bseg_a|Bseg_b|Bseg_c|Bseg_d|Bseg_g|Bseg_f        // char "9"  0x09

#define  BChar_A  Bseg_a|Bseg_b|Bseg_c|Bseg_e|Bseg_f|Bseg_g  // char "A"
#define  BChar_B  Bseg_c|Bseg_d|Bseg_e|Bseg_f|Bseg_g        // char "b"
#define  BChar_C  Bseg_a|Bseg_d|Bseg_e|Bseg_f             // char "C"
#define  BChar_D  Bseg_b|Bseg_c|Bseg_d|Bseg_e|Bseg_g        // char "d"
#define  BChar_E  Bseg_a|Bseg_d|Bseg_e|Bseg_f|Bseg_g        // char "E"
#define  BChar_F  Bseg_a|Bseg_e|Bseg_f|Bseg_g              // char "F"

#define	 BChar_G   Bseg_g                                // char "-"
#define  BChar_H  Bseg_b|Bseg_c|Bseg_e|Bseg_f|Bseg_g        // char "H"
#define  BChar_i  Bseg_c                               // char "i"
#define  BChar_I  Bseg_c                                // char "I"
#define  BChar_J  Bseg_b|Bseg_c|Bseg_d|Bseg_e             // char "J"
#define  BChar_L  Bseg_d|Bseg_f|Bseg_e                    // char "L"
#define  BChar_n  Bseg_c|Bseg_e|Bseg_g                    // char "n"
#define  BChar_N  Bseg_a|Bseg_b|Bseg_c|Bseg_e|Bseg_f       // char "N"
#define  BChar_O  Bseg_c|Bseg_d|Bseg_e|Bseg_g              // char "o"
#define  BChar_P  Bseg_a|Bseg_b|Bseg_e|Bseg_f|Bseg_g        // char "P"
#define  BChar_Q  Bseg_a|Bseg_b|Bseg_c|Bseg_f|Bseg_g        // char "q"
#define  BChar_R  Bseg_e|Bseg_g                          // char "r"
#define  BChar_T  Bseg_d|Bseg_e|Bseg_f|Bseg_g              // char "t"
#define  BChar_U  Bseg_b|Bseg_c|Bseg_d |Bseg_e|Bseg_f                   // char "u"
#define  BChar_NULL 0


// position==3 6 16   abc efd  g  20210717

//===================================================================
// position==8  ea gfb dc    20210717
#define Cseg_a	(1<<2)
#define Cseg_b	(1<<5)
#define Cseg_c	(1<<6)
#define Cseg_d	(1<<4)
#define Cseg_e	(1<<1)
#define Cseg_f	(1<<0)
#define Cseg_g	(1<<3)

#define  CChar_0  Cseg_a|Cseg_b|Cseg_c|Cseg_d|Cseg_e|Cseg_f        // char "0"  0x00
#define  CChar_1  Cseg_b|Cseg_c                                // char "1"  0x01
#define  CChar_2  Cseg_a|Cseg_b|Cseg_g|Cseg_e|Cseg_d             // char "2"  0x02
#define  CChar_3  Cseg_a|Cseg_b|Cseg_c|Cseg_d|Cseg_g              // char "3"  0x03
#define  CChar_4  Cseg_b|Cseg_c|Cseg_f|Cseg_g                    // char "4"  0x04
#define  CChar_5  Cseg_a|Cseg_f|Cseg_g|Cseg_c|Cseg_d              // char "5"  0x05
#define  CChar_6  Cseg_a|Cseg_f|Cseg_e|Cseg_d|Cseg_c|Cseg_g        // char "6"  0x06
#define  CChar_7  Cseg_a|Cseg_b|Cseg_c                   // char "7"  0x07
#define  CChar_8  Cseg_a|Cseg_b|Cseg_c|Cseg_d|Cseg_e|Cseg_f|Cseg_g  // char "8"  0x08
#define  CChar_9  Cseg_a|Cseg_b|Cseg_c|Cseg_d|Cseg_g|Cseg_f        // char "9"  0x09

#define  CChar_A  Cseg_a|Cseg_b|Cseg_c|Cseg_e|Cseg_f|Cseg_g  // char "A"
#define  CChar_B  Cseg_c|Cseg_d|Cseg_e|Cseg_f|Cseg_g        // char "b"
#define  CChar_C  Cseg_a|Cseg_d|Cseg_e|Cseg_f             // char "C"
#define  CChar_D  Cseg_b|Cseg_c|Cseg_d|Cseg_e|Cseg_g        // char "d"
#define  CChar_E  Cseg_a|Cseg_d|Cseg_e|Cseg_f|Cseg_g        // char "E"
#define  CChar_F  Cseg_a|Cseg_e|Cseg_f|Cseg_g              // char "F"

#define	 CChar_G   Cseg_g                                // char "-"
#define  CChar_H  Cseg_b|Cseg_c|Cseg_e|Cseg_f|Cseg_g        // char "H"
#define  CChar_i  Cseg_c                               // char "i"
#define  CChar_I  Cseg_c                                // char "I"
#define  CChar_J  Cseg_b|Cseg_c|Cseg_d|Cseg_e             // char "J"
#define  CChar_L  Cseg_d|Cseg_f|Cseg_e                    // char "L"
#define  CChar_n  Cseg_c|Cseg_e|Cseg_g                    // char "n"
#define  CChar_N  Cseg_a|Cseg_b|Cseg_c|Cseg_e|Cseg_f       // char "N"
#define  CChar_O  Cseg_c|Cseg_d|Cseg_e|Cseg_g              // char "o"
#define  CChar_P  Cseg_a|Cseg_b|Cseg_e|Cseg_f|Cseg_g        // char "P"
#define  CChar_Q  Cseg_a|Cseg_b|Cseg_c|Cseg_f|Cseg_g        // char "q"
#define  CChar_R  Cseg_e|Cseg_g                          // char "r"
#define  CChar_T  Cseg_d|Cseg_e|Cseg_f|Cseg_g              // char "t"
#define  CChar_U  Cseg_b|Cseg_c|Cseg_d |Cseg_e|Cseg_f                   // char "u"
#define  CChar_NULL 0


//===================================================================
// position==9 11  dge cfa b    20210717
#define Dseg_a	(1<<6)
#define Dseg_b	(1<<4)
#define Dseg_c	(1<<5)
#define Dseg_d	(1<<3)
#define Dseg_e	(1<<1)
#define Dseg_f	(1<<0)
#define Dseg_g	(1<<2)

#define  DChar_0  Dseg_a|Dseg_b|Dseg_c|Dseg_d|Dseg_e|Dseg_f        // char "0"  0x00
#define  DChar_1  Dseg_b|Dseg_c                                // char "1"  0x01
#define  DChar_2  Dseg_a|Dseg_b|Dseg_g|Dseg_e|Dseg_d             // char "2"  0x02
#define  DChar_3  Dseg_a|Dseg_b|Dseg_c|Dseg_d|Dseg_g              // char "3"  0x03
#define  DChar_4  Dseg_b|Dseg_c|Dseg_f|Dseg_g                    // char "4"  0x04
#define  DChar_5  Dseg_a|Dseg_f|Dseg_g|Dseg_c|Dseg_d              // char "5"  0x05
#define  DChar_6  Dseg_a|Dseg_f|Dseg_e|Dseg_d|Dseg_c|Dseg_g        // char "6"  0x06
#define  DChar_7  Dseg_a|Dseg_b|Dseg_c                   // char "7"  0x07
#define  DChar_8  Dseg_a|Dseg_b|Dseg_c|Dseg_d|Dseg_e|Dseg_f|Dseg_g  // char "8"  0x08
#define  DChar_9  Dseg_a|Dseg_b|Dseg_c|Dseg_d|Dseg_g|Dseg_f        // char "9"  0x09

#define  DChar_A  Dseg_a|Dseg_b|Dseg_c|Dseg_e|Dseg_f|Dseg_g  // char "A"
#define  DChar_B  Dseg_c|Dseg_d|Dseg_e|Dseg_f|Dseg_g        // char "b"
#define  DChar_C  Dseg_a|Dseg_d|Dseg_e|Dseg_f             // char "C"
#define  DChar_D  Dseg_b|Dseg_c|Dseg_d|Dseg_e|Dseg_g        // char "d"
#define  DChar_E  Dseg_a|Dseg_d|Dseg_e|Dseg_f|Dseg_g        // char "E"
#define  DChar_F  Dseg_a|Dseg_e|Dseg_f|Dseg_g              // char "F"

#define	 DChar_G   Dseg_g                                // char "-"
#define  DChar_H  Dseg_b|Dseg_c|Dseg_e|Dseg_f|Dseg_g        // char "H"
#define  DChar_i  Dseg_c                               // char "i"
#define  DChar_I  Dseg_c                                // char "I"
#define  DChar_J  Dseg_b|Dseg_c|Dseg_d|Dseg_e             // char "J"
#define  DChar_L  Dseg_d|Dseg_f|Dseg_e                    // char "L"
#define  DChar_n  Dseg_c|Dseg_e|Dseg_g                    // char "n"
#define  DChar_N  Dseg_a|Dseg_b|Dseg_c|Dseg_e|Dseg_f       // char "N"
#define  DChar_O  Dseg_c|Dseg_d|Dseg_e|Dseg_g              // char "o"
#define  DChar_P  Dseg_a|Dseg_b|Dseg_e|Dseg_f|Dseg_g        // char "P"
#define  DChar_Q  Dseg_a|Dseg_b|Dseg_c|Dseg_f|Dseg_g        // char "q"
#define  DChar_R  Dseg_e|Dseg_g                          // char "r"
#define  DChar_T  Dseg_d|Dseg_e|Dseg_f|Dseg_g              // char "t"
#define  DChar_U  Dseg_b|Dseg_c|Dseg_d |Dseg_e|Dseg_f                   // char "u"
#define  DChar_NULL 0


//===================================================================
// position==12 14  cba dfe g    20210717
#define Eseg_a	(1<<0)
#define Eseg_b	(1<<1)
#define Eseg_c	(1<<2)
#define Eseg_d	(1<<5)
#define Eseg_e	(1<<6)
#define Eseg_f	(1<<3)
#define Eseg_g	(1<<4)

#define  EChar_0  Eseg_a|Eseg_b|Eseg_c|Eseg_d|Eseg_e|Eseg_f        // char "0"  0x00
#define  EChar_1  Eseg_b|Eseg_c                                // char "1"  0x01
#define  EChar_2  Eseg_a|Eseg_b|Eseg_g|Eseg_e|Eseg_d             // char "2"  0x02
#define  EChar_3  Eseg_a|Eseg_b|Eseg_c|Eseg_d|Eseg_g              // char "3"  0x03
#define  EChar_4  Eseg_b|Eseg_c|Eseg_f|Eseg_g                    // char "4"  0x04
#define  EChar_5  Eseg_a|Eseg_f|Eseg_g|Eseg_c|Eseg_d              // char "5"  0x05
#define  EChar_6  Eseg_a|Eseg_f|Eseg_e|Eseg_d|Eseg_c|Eseg_g        // char "6"  0x06
#define  EChar_7  Eseg_a|Eseg_b|Eseg_c                   // char "7"  0x07
#define  EChar_8  Eseg_a|Eseg_b|Eseg_c|Eseg_d|Eseg_e|Eseg_f|Eseg_g  // char "8"  0x08
#define  EChar_9  Eseg_a|Eseg_b|Eseg_c|Eseg_d|Eseg_g|Eseg_f        // char "9"  0x09

#define  EChar_A  Eseg_a|Eseg_b|Eseg_c|Eseg_e|Eseg_f|Eseg_g  // char "A"
#define  EChar_B  Eseg_c|Eseg_d|Eseg_e|Eseg_f|Eseg_g        // char "b"
#define  EChar_C  Eseg_a|Eseg_d|Eseg_e|Eseg_f             // char "C"
#define  EChar_D  Eseg_b|Eseg_c|Eseg_d|Eseg_e|Eseg_g        // char "d"
#define  EChar_E  Eseg_a|Eseg_d|Eseg_e|Eseg_f|Eseg_g        // char "E"
#define  EChar_F  Eseg_a|Eseg_e|Eseg_f|Eseg_g              // char "F"

#define	 EChar_G   Eseg_g                                // char "-"
#define  EChar_H  Eseg_b|Eseg_c|Eseg_e|Eseg_f|Eseg_g        // char "H"
#define  EChar_i  Eseg_c                               // char "i"
#define  EChar_I  Eseg_c                                // char "I"
#define  EChar_J  Eseg_b|Eseg_c|Eseg_d|Eseg_e             // char "J"
#define  EChar_L  Eseg_d|Eseg_f|Eseg_e                    // char "L"
#define  EChar_n  Eseg_c|Eseg_e|Eseg_g                    // char "n"
#define  EChar_N  Eseg_a|Eseg_b|Eseg_c|Eseg_e|Eseg_f       // char "N"
#define  EChar_O  Eseg_c|Eseg_d|Eseg_e|Eseg_g              // char "o"
#define  EChar_P  Eseg_a|Eseg_b|Eseg_e|Eseg_f|Eseg_g        // char "P"
#define  EChar_Q  Eseg_a|Eseg_b|Eseg_c|Eseg_f|Eseg_g        // char "q"
#define  EChar_R  Eseg_e|Eseg_g                          // char "r"
#define  EChar_T  Eseg_d|Eseg_e|Eseg_f|Eseg_g              // char "t"
#define  EChar_U  Eseg_b|Eseg_c|Eseg_d |Eseg_e|Eseg_f                   // char "u"
#define  EChar_NULL 0



//===================================================================
// position==13   ba cfe dg    20210717
#define Fseg_a	(1<<0)
#define Fseg_b	(1<<4)
#define Fseg_c	(1<<6)
#define Fseg_d	(1<<3)
#define Fseg_e	(1<<2)
#define Fseg_f	(1<<1)
#define Fseg_g	(1<<5)

#define  FChar_0  Fseg_a|Fseg_b|Fseg_c|Fseg_d|Fseg_e|Fseg_f        // char "0"  0x00
#define  FChar_1  Fseg_b|Fseg_c                                // char "1"  0x01
#define  FChar_2  Fseg_a|Fseg_b|Fseg_g|Fseg_e|Fseg_d             // char "2"  0x02
#define  FChar_3  Fseg_a|Fseg_b|Fseg_c|Fseg_d|Fseg_g              // char "3"  0x03
#define  FChar_4  Fseg_b|Fseg_c|Fseg_f|Fseg_g                    // char "4"  0x04
#define  FChar_5  Fseg_a|Fseg_f|Fseg_g|Fseg_c|Fseg_d              // char "5"  0x05
#define  FChar_6  Fseg_a|Fseg_f|Fseg_e|Fseg_d|Fseg_c|Fseg_g        // char "6"  0x06
#define  FChar_7  Fseg_a|Fseg_b|Fseg_c                   // char "7"  0x07
#define  FChar_8  Fseg_a|Fseg_b|Fseg_c|Fseg_d|Fseg_e|Fseg_f|Fseg_g  // char "8"  0x08
#define  FChar_9  Fseg_a|Fseg_b|Fseg_c|Fseg_d|Fseg_g|Fseg_f        // char "9"  0x09

#define  FChar_A  Fseg_a|Fseg_b|Fseg_c|Fseg_e|Fseg_f|Fseg_g  // char "A"
#define  FChar_B  Fseg_c|Fseg_d|Fseg_e|Fseg_f|Fseg_g        // char "b"
#define  FChar_C  Fseg_a|Fseg_d|Fseg_e|Fseg_f             // char "C"
#define  FChar_D  Fseg_b|Fseg_c|Fseg_d|Fseg_e|Fseg_g        // char "d"
#define  FChar_E  Fseg_a|Fseg_d|Fseg_e|Fseg_f|Fseg_g        // char "E"
#define  FChar_F  Fseg_a|Fseg_e|Fseg_f|Fseg_g              // char "F"

#define	 FChar_G   Fseg_g                                // char "-"
#define  FChar_H  Fseg_b|Fseg_c|Fseg_e|Fseg_f|Fseg_g        // char "H"
#define  FChar_i  Fseg_c                               // char "i"
#define  FChar_I  Fseg_c                                // char "I"
#define  FChar_J  Fseg_b|Fseg_c|Fseg_d|Fseg_e             // char "J"
#define  FChar_L  Fseg_d|Fseg_f|Fseg_e                    // char "L"
#define  FChar_n  Fseg_c|Fseg_e|Fseg_g                    // char "n"
#define  FChar_N  Fseg_a|Fseg_b|Fseg_c|Fseg_e|Fseg_f       // char "N"
#define  FChar_O  Fseg_c|Fseg_d|Fseg_e|Fseg_g              // char "o"
#define  FChar_P  Fseg_a|Fseg_b|Fseg_e|Fseg_f|Fseg_g        // char "P"
#define  FChar_Q  Fseg_a|Fseg_b|Fseg_c|Fseg_f|Fseg_g        // char "q"
#define  FChar_R  Fseg_e|Fseg_g                          // char "r"
#define  FChar_T  Fseg_d|Fseg_e|Fseg_f|Fseg_g              // char "t"
#define  FChar_U  Fseg_b|Fseg_c|Fseg_d |Fseg_e|Fseg_f                   // char "u"
#define  FChar_NULL 0

#define Gseg_a	(1<<0)
#define Gseg_b	(1<<1)
#define Gseg_c	(1<<2)
#define Gseg_d	(1<<3)
#define Gseg_e	(1<<6)
#define Gseg_f	(1<<4)
#define Gseg_g	(1<<5)

#define  GChar_0  Gseg_a|Gseg_b|Gseg_c|Gseg_d|Gseg_e|Gseg_f        // char "0"  0x00
#define  GChar_1  Gseg_b|Gseg_c                                // char "1"  0x01
#define  GChar_2  Gseg_a|Gseg_b|Gseg_g|Gseg_e|Gseg_d             // char "2"  0x02
#define  GChar_3  Gseg_a|Gseg_b|Gseg_c|Gseg_d|Gseg_g              // char "3"  0x03
#define  GChar_4  Gseg_b|Gseg_c|Gseg_f|Gseg_g                    // char "4"  0x04
#define  GChar_5  Gseg_a|Gseg_f|Gseg_g|Gseg_c|Gseg_d              // char "5"  0x05
#define  GChar_6  Gseg_a|Gseg_f|Gseg_e|Gseg_d|Gseg_c|Gseg_g        // char "6"  0x06
#define  GChar_7  Gseg_a|Gseg_b|Gseg_c                   // char "7"  0x07
#define  GChar_8  Gseg_a|Gseg_b|Gseg_c|Gseg_d|Gseg_e|Gseg_f|Gseg_g  // char "8"  0x08
#define  GChar_9  Gseg_a|Gseg_b|Gseg_c|Gseg_d|Gseg_g|Gseg_f        // char "9"  0x09

#define  GChar_A  Gseg_a|Gseg_b|Gseg_c|Gseg_e|Gseg_f|Gseg_g  // char "A"
#define  GChar_B  Gseg_c|Gseg_d|Gseg_e|Gseg_f|Gseg_g        // char "b"
#define  GChar_C  Gseg_a|Gseg_d|Gseg_e|Gseg_f             // char "C"
#define  GChar_D  Gseg_b|Gseg_c|Gseg_d|Gseg_e|Gseg_g        // char "d"
#define  GChar_E  Gseg_a|Gseg_d|Gseg_e|Gseg_f|Gseg_g        // char "E"
#define  GChar_F  Gseg_a|Gseg_e|Gseg_f|Gseg_g              // char "F"

#define	 GChar_G   Gseg_g                                // char "-"
#define  GChar_H  Gseg_b|Gseg_c|Gseg_e|Gseg_f|Gseg_g        // char "H"
#define  GChar_i  Gseg_c                               // char "i"
#define  GChar_I  Gseg_c                                // char "I"
#define  GChar_J  Gseg_b|Gseg_c|Gseg_d|Gseg_e             // char "J"
#define  GChar_L  Gseg_d|Gseg_f|Gseg_e                    // char "L"
#define  GChar_n  Gseg_c|Gseg_e|Gseg_g                    // char "n"
#define  GChar_N  Gseg_a|Gseg_b|Gseg_c|Gseg_e|Gseg_f       // char "N"
#define  GChar_O  Gseg_c|Gseg_d|Gseg_e|Gseg_g              // char "o"
#define  GChar_P  Gseg_a|Gseg_b|Gseg_e|Gseg_f|Gseg_g        // char "P"
#define  GChar_Q  Gseg_a|Gseg_b|Gseg_c|Gseg_f|Gseg_g        // char "q"
#define  GChar_R  Gseg_e|Gseg_g                          // char "r"
#define  GChar_T  Gseg_d|Gseg_e|Gseg_f|Gseg_g              // char "t"
#define  GChar_U  Gseg_b|Gseg_c|Gseg_d |Gseg_e|Gseg_f                   // char "u"
#define  GChar_NULL 0

#define Hseg_a	(1<<2)
#define Hseg_b	(1<<1)
#define Hseg_c	(1<<0)
#define Hseg_d	(1<<4)
#define Hseg_e	(1<<3)
#define Hseg_f	(1<<5)
#define Hseg_g	(1<<4)

#define  HChar_0  Hseg_a|Hseg_b|Hseg_c|Hseg_d|Hseg_e|Hseg_f        // char "0"  0x00
#define  HChar_1  Hseg_b|Hseg_c                                // char "1"  0x01
#define  HChar_2  Hseg_a|Hseg_b|Hseg_g|Hseg_e|Hseg_d             // char "2"  0x02
#define  HChar_3  Hseg_a|Hseg_b|Hseg_c|Hseg_d|Hseg_g              // char "3"  0x03
#define  HChar_4  Hseg_b|Hseg_c|Hseg_f|Hseg_g                    // char "4"  0x04
#define  HChar_5  Hseg_a|Hseg_f|Hseg_g|Hseg_c|Hseg_d              // char "5"  0x05
#define  HChar_6  Hseg_a|Hseg_f|Hseg_e|Hseg_d|Hseg_c|Hseg_g        // char "6"  0x06
#define  HChar_7  Hseg_a|Hseg_b|Hseg_c                   // char "7"  0x07
#define  HChar_8  Hseg_a|Hseg_b|Hseg_c|Hseg_d|Hseg_e|Hseg_f|Hseg_g  // char "8"  0x08
#define  HChar_9  Hseg_a|Hseg_b|Hseg_c|Hseg_d|Hseg_g|Hseg_f        // char "9"  0x09

#define  HChar_A  Hseg_a|Hseg_b|Hseg_c|Hseg_e|Hseg_f|Hseg_g  // char "A"
#define  HChar_B  Hseg_c|Hseg_d|Hseg_e|Hseg_f|Hseg_g        // char "b"
#define  HChar_C  Hseg_a|Hseg_d|Hseg_e|Hseg_f             // char "C"
#define  HChar_D  Hseg_b|Hseg_c|Hseg_d|Hseg_e|Hseg_g        // char "d"
#define  HChar_E  Hseg_a|Hseg_d|Hseg_e|Hseg_f|Hseg_g        // char "E"
#define  HChar_F  Hseg_a|Hseg_e|Hseg_f|Hseg_g              // char "F"

#define	 HChar_G   Hseg_g                                // char "-"
#define  HChar_H  Hseg_b|Hseg_c|Hseg_e|Hseg_f|Hseg_g        // char "H"
#define  HChar_i  Hseg_c                               // char "i"
#define  HChar_I  Hseg_c                                // char "I"
#define  HChar_J  Hseg_b|Hseg_c|Hseg_d|Hseg_e             // char "J"
#define  HChar_L  Hseg_d|Hseg_f|Hseg_e                    // char "L"
#define  HChar_n  Hseg_c|Hseg_e|Hseg_g                    // char "n"
#define  HChar_N  Hseg_a|Hseg_b|Hseg_c|Hseg_e|Hseg_f       // char "N"
#define  HChar_O  Hseg_c|Hseg_d|Hseg_e|Hseg_g              // char "o"
#define  HChar_P  Hseg_a|Hseg_b|Hseg_e|Hseg_f|Hseg_g        // char "P"
#define  HChar_Q  Hseg_a|Hseg_b|Hseg_c|Hseg_f|Hseg_g        // char "q"
#define  HChar_R  Hseg_e|Hseg_g                          // char "r"
#define  HChar_T  Hseg_d|Hseg_e|Hseg_f|Hseg_g              // char "t"
#define  HChar_U  Hseg_b|Hseg_c|Hseg_d |Hseg_e|Hseg_f                   // char "u"
#define  HChar_NULL 0
//=================================================================================================

#define MemorySetHundred		1  //待调试
#define PulseSingle					16
#define PulseTen						15
#define MemorySetSingle			14
#define MemorySetTen				13
#define DIASingle						12
#define DIATen							11
#define DIAHundred					10
#define SYSSingle						9
#define SYSTen							8
#define SYSHundred					7
#define MINSingle						6
#define MINTen							5
#define HourSingle					4
#define DaySingle						3
#define DayTen							2
#define MonthSingle					1

//==================================================================================================


#define UserAIconOn 		seg_buf[29] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define UserAIconOff 		seg_buf[29] &= ~(0x01 << 2); lcd_ram_refresh(seg_buf)
#define UserBIconOn 		seg_buf[29] |= (0x01 << 3); lcd_ram_refresh(seg_buf)
#define UserBIconOff 		seg_buf[29] &= ~(0x01 << 3); lcd_ram_refresh(seg_buf)
#define AMIconOn 			seg_buf[29] |= (0x01 << 4); lcd_ram_refresh(seg_buf)
#define AMIconOff 			seg_buf[29] &= ~(0x01 << 4); lcd_ram_refresh(seg_buf)
#define PMIconOn 			seg_buf[34] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define PMIconOff 			seg_buf[34] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)
#define HeartIconOn  		seg_buf[32] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define HeartIconOff 		seg_buf[32] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)
#define PADIconOn			seg_buf[31] |= (0x01 << 1); lcd_ram_refresh(seg_buf)
#define PADIconOff 			seg_buf[31] &= ~(0x01 << 1); lcd_ram_refresh(seg_buf)
#define PULBAIIconOn 		seg_buf[31] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define PULBAIIconOff 		seg_buf[31] &= ~(0x01 << 2); lcd_ram_refresh(seg_buf)
#define SmallManIconOn
#define SmallManIconOff
#define mmHgIconOn   		seg_buf[30] |= (0x01 << 1); lcd_ram_refresh(seg_buf)
#define mmHgIconOff  		seg_buf[30] &= ~(0x01 << 1); lcd_ram_refresh(seg_buf)
#define kPaIconOn   		seg_buf[28] |= (0x01 << 1); lcd_ram_refresh(seg_buf)
#define kPaIconOff  		seg_buf[28] &= ~(0x01 << 1); lcd_ram_refresh(seg_buf)
#define ArmLetIconOn
#define ArmLetIconOff
#define DayIconOn 			seg_buf[28] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define DayIconOff 			seg_buf[28] &= ~(0x01 << 2); lcd_ram_refresh(seg_buf)
#define MonthIconOn 		seg_buf[23] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define MonthIconOff 		seg_buf[23] &= ~(0x01 << 2); lcd_ram_refresh(seg_buf)
#define MonthTenIconOn 		seg_buf[21] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define MonthTenIconOff 	seg_buf[21] &= ~(0x01 << 2); lcd_ram_refresh(seg_buf)

#define kPaPointSYSIconOn 	seg_buf[15] |= (0x01 << 3); lcd_ram_refresh(seg_buf)
#define kPaPointSYSIconOff 	seg_buf[15] &= ~(0x01 << 3); lcd_ram_refresh(seg_buf)
#define kPaPointDIAIconOn 	seg_buf[15] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define kPaPointDIAIconOff 	seg_buf[15] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)

#define MemoryIconOn 		seg_buf[37] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define MemoryIconOff 		seg_buf[37] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)
#define LBTIconOn 			seg_buf[34] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define LBTIconOff 			seg_buf[34] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)


//20230612
#define WHOLevel6Icon	 	seg_buf[20] |= (0x01 << 5); lcd_ram_refresh(seg_buf)
#define WHOLevel5Icon	 	seg_buf[20] |= (0x01 << 4); lcd_ram_refresh(seg_buf)
#define WHOLevel4Icon	 	seg_buf[20] |= (0x01 << 3); lcd_ram_refresh(seg_buf)
#define WHOLevel3Icon	 	seg_buf[20] |= (0x01 << 2); lcd_ram_refresh(seg_buf)
#define WHOLevel2Icon	 	seg_buf[20] |= (0x01 << 1); lcd_ram_refresh(seg_buf)
#define WHOLevel1Icon	  	seg_buf[20] |= (0x01 << 0); lcd_ram_refresh(seg_buf)

//备份
#define Time1IconOn1 		seg_buf[30] |= (0x01 << 2); lcd_ram_refresh(seg_buf)//J
#define Time1IconOn2 		seg_buf[30] |= (0x01 << 4); lcd_ram_refresh(seg_buf)//I
#define Time2IconOn 		seg_buf[30] |= (0x01 << 3); lcd_ram_refresh(seg_buf)//H
#define TimeTenIconOff1 	seg_buf[30] &= ~(0x01 << 2 | 0x01 << 4); lcd_ram_refresh(seg_buf)
#define TimeTenIconOff2 	seg_buf[30] &= ~(0x01 << 3); lcd_ram_refresh(seg_buf)

#define TimePointIconOn 	seg_buf[33] |= (0x01 << 5); lcd_ram_refresh(seg_buf)
#define TimePointIconOff 	seg_buf[33] &= ~(0x01 << 5); lcd_ram_refresh(seg_buf)

#define	WHOLevelIconOff		seg_buf[20] &= 0x00; lcd_ram_refresh(seg_buf)

#define BTIconOn
#define BTIconOff
#define VoiceOffIconOn
#define VoiceOffIconOff

#define DisplayYear20 		{Time1IconOn1;Time2IconOn;}
#define DisplayHour20 		DisplayYear20
#define DisplayHourTen1 	Time1IconOn1
#define DisplayHourTen2 	Time1IconOn2
#define DarkHourTen1	 	TimeTenIconOff1
#define DarkHourTen2	 	TimeTenIconOff2

#define BAR1IconOn
#define BAR1IconOff
#define BAR2IconOn
#define BAR2IconOff
#define BAR3IconOn
#define BAR3IconOff
#define BAR4IconOn
#define BAR4IconOff
#define BAR5IconOn
#define BAR5IconOff
#define BAR6IconOn
#define BAR6IconOff
#define BAR7IconOn
#define BAR7IconOff
#define BAR8IconOn
#define BAR8IconOff

#define MoveIconOn       seg_buf[30] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define MoveIconOff      seg_buf[30] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)
#define CuffIconOn       seg_buf[28] |= (0x01 << 0); lcd_ram_refresh(seg_buf)
#define CuffIconOff      seg_buf[28] &= ~(0x01 << 0); lcd_ram_refresh(seg_buf)

#define DPIconOn
#define DPIconOff


#define ResultIcon2On
#define ResultIcon2Off

#define ResultIcon3On
#define ResultIcon3Off

#define W1IconOn
#define W1IconOff
#define W2IconOn
#define W2IconOff
#define W3IconOn
#define W3IconOff
#define W4IconOn
#define W4IconOff

void UserLCD_Init(void);
void ShowAllIcon(void);
void DarkAllIcon(void);


void DisplayHalfByte(uint8 LCDData,uint8 position);
void ShowAllIcon(void);
void DarkAllIcon(void);
void LCD5bitDisplay(uint16 TwoByte);
void LCD5bitDisplayT(uint16 TwoByte);
void LCD8bitDisplay(uint8 DDataH,uint8 DDataM,uint8 DDataL);

void DisplayToPUL(unsigned char i);
void DisplayToSYSDIA(unsigned int SYS,unsigned char position);
void DisplayToMemorySet(unsigned int i);
void DisplayLongData1(unsigned int i);
void DisplayLongData(unsigned int i);
void darkwordtolcdmin(void);
void darkwordtolcdhour(void);
void darkwordtolcdday(void);
void darkwordtolcdmonth(void);
void showminute(void);
void showhour(void);
void showday(void);
void showmonth(void);
void showtime(void);
void showdate(void);
void showyear(void);
void flashminute(void);
void flashtimepoint(void);
void flashhour(void);
void flashday(void);
void flashmonth(void);
void flashyear(void);
void UserABDisplay(void);
void showpressure(void);
void mmHgKpaDisplay(unsigned char SysDisplay,unsigned char DiaDisplay);

void	showpres(void) ;

void ShowPumpWHO(void);
void heartsignon(void);
void heartsignoff(void);

void	Calshowpres(void) ;
void ShowBTBar(void);
void mmHgKpaSetDisplay(void);
void	showerror(void);
void   ShowWHO(unsigned char WHOSYS,unsigned char WHODIA);
void DisplayToSYSDIA(unsigned int SYS,unsigned char position);
void	flashuser(void);
void	flashmemoryset(unsigned char i);
void SPDisplay(void);
void EngTurDisplay(void);
void ShowVoiceCET(void);
void ShowVoiceLevel(void);
void showalarm(void);
void flashalarm(unsigned char i);
void SpeakDisplay(void);
void flashCL(void);
void ShowRestTime(uint32 TimeCount);
void ShowMemoryDate(unsigned char MM,unsigned char DD);
void ShowMemoryTime(unsigned char HH,unsigned char MM);
void lowbsignon(void);
void	flashParameter(void);

void DisplayHalfByte1(uint8 LCDData,uint8 position);
void LCDTEST(void);
void lcd_ram_refresh(uint8_t *seg_buf);

#endif



/************************ (C) COPYRIGHT Hangzhou SDIC Microelectronics *****END OF FILE****/
